{% if currencies|length > 1 %}
{#<div class="">#}
  <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-currency">
    <select name="{{ currency.code }}" id="select-currency" onchange="currencyChange(this)" class="hidden-sm hidden-md hidden-lg form-control">
        {% for currency in currencies %}
            {% if currency.symbol_left %}
                {% if currency.title == 'USD' and currency.code == code %}
                    {% if currency.code == 'USD' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% elseif currency.title == 'GBP' and currency.code == code %}
                    {% if currency.code == 'GBP' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% else %}
                    {% if currency.code == 'EUR' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% endif %}
            {% else %}
                {% if currency.title == 'USD' and currency.code == code %}
                    {% if currency.code == 'USD' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_right }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% elseif currency.title == 'GBP' and currency.code == code %}
                    {% if currency.code == 'GBP' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_right }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% else %}
                    {% if currency.code == 'EUR' %}
                      <option value="{{ currency.code }}" selected>{{ currency.symbol_right }} {{ currency.title }}</option>
                    {% else %}
                      <option value="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</option>
                    {% endif %}
                {% endif %}
            {% endif %}
        {% endfor %}
    </select>
    <div class="btn-group hidden-xs">
      <button class="btn currency-btn dropdown-toggle hidden-sm hidden-xs" data-toggle="dropdown">
          {% for currency in currencies %}
            {% if currency.symbol_left and currency.code == code %}
              <strong>{{ currency.symbol_left }}</strong>
            {% elseif currency.symbol_right and currency.code == code %}
              <strong>{{ currency.symbol_right }}</strong>
            {% endif %}
          {% endfor %}
        <span class="hidden-md hidden-sm hidden-xs">{{ text_currency }}</span>&nbsp;<i class="fa fa-caret-down"></i>
      </button>
      <button class="btn currency-btn dropdown-toggle hidden-lg hidden-md" data-toggle="dropdown">{% for currency in currencies %}
      {% if currency.symbol_left and currency.code == code %} <strong>{{ currency.symbol_left }}</strong> {% elseif currency.symbol_right and currency.code == code %} <strong>{{ currency.symbol_right }}</strong> {% endif %}
      {% endfor %} <span class="hidden-md">{{ text_currency }}</span>&nbsp;<i class="fa fa-caret-down"></i></button>
      <ul class="dropdown-menu header-menu" id="select-click">
        {% for currency in currencies %}
        {% if currency.symbol_left %}
        <li>
          <button class="currency-select btn currency-btn btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</button>
        </li>
        {% else %}
        <li>
          <button class="currency-select btn currency-btn btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_right }} {{ currency.title }}</button>
        </li>
        {% endif %}
        {% endfor %}
      </ul>
    </div>
    <input type="hidden" name="code" value="" />
    <input type="hidden" name="redirect" value="{{ redirect }}" />
  </form>
{#</div>#}
{% endif %}
<script>
  function currencyChange(_this) {
      $('#select-click').find('li button[name='+_this.value+']').click();
  }
</script>